package com.qian;

import com.qian.login.Login;
import com.qian.login.User;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //创建arrayList容器
        ArrayList<User> list = new ArrayList<>();
        User user = new User("Qiantao2","11111","666666666666666666","15519687617");
        list.add(user);

        while(true){
            String n;
            Login.homepage(); //主页
            n = sc.next();

            switch (n){
                case "1":
                    //登录
                    Login.login(list);
                    break;
                case "2":
                    //注册
                    Login.userRegister(list);
                    break;
                case "3":
                    //忘记密码
                    Login.forgetThePassword(list);
                    break;
                case "4":
                    //退出
                    System.out.println("退出程序！");
                    System.exit(1);
                default:
                    System.out.println("输入错误！");
                    break;
            }
        }
    }
}
